package huawei.interview;

import java.util.Scanner;

/**
 * @author gh
 * @create 2021-05-31 16:07
 */
public class t2_2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {// 注意，如果输入是多个测试用例，请通过while循环处理多个测试用例
            String[] str = in.nextLine().split(" ");
            int[] nums = new int[str.length];
            int i = 0;
            for (String s : str) {
                nums[i] = Integer.valueOf(s);
                i++;
            }
            if (nums.length < 1) {
                return;
            }
            if (nums.length == 1) {
                System.out.println(nums[0] + " " + nums[0]);
                return;
            }
            int sum = 65535*2, m = 0, n = 0;
            for (int a = 0; a < nums.length-1; a++) {
                for (int b = a+1; b< nums.length; b++) {
                    if (Math.abs(nums[a] + nums[b]) < sum) {
                        sum = Math.abs(nums[a] + nums[b]);
                        m = nums[a] < nums[b] ? nums[a] : nums[b];
                        n = nums[a] < nums[b] ? nums[b] : nums[a];
                    }
                }
            }
            System.out.println(m + " " + n + " " + sum);
        }
    }
}
